$primary-color: #8ac24e;
$secondary-color: #64b3f4;
$third-color: #d64680;

body {
  background-image: url(../img/peashooter2.png);
  background-repeat: no-repeat;
  background-size: 350px 300px;
  background-position: 0 200px;

  #zombie {
    position: absolute;
    right: -40px;
    top: 200px;
    width: 350px;
    height: 250px;
    z-index: -1;
  }
  main {
    .main-top {
      display: flex;
      justify-content: space-between;
      width: 100%;
      height: 50px;
      margin: 15px 0;
      [class^='option'] {
        width: 135px;
        height: 100%;
        text-align: center;
        line-height: 50px;
        border-radius: 5px;
        color: white;
        font-weight: bold;
        box-shadow: 0px 0px 3px 3px #ccc;
        display: flex;
        justify-content: center;
        align-items: center;
        img {
          width: 18px;
          height: 18px;
          margin-left: 5px;
        }
        &:hover {
          cursor: pointer;
        }

        &:nth-of-type(2n) {
          background-color: $secondary-color;
        }
        &:nth-of-type(2n + 1) {
          background-color: $primary-color;
        }
      }
    }
    .main-bottom {
      width: 100%;
      margin-top: 15px;
      border-radius: 5px;

      .mb-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-right: 20px;
        background-color: #fff;
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        border-bottom: 1px solid #ccc;
        .tabs {
          display: flex;
          height: 35px;

          [class^='tab'] {
            width: 130px;
            height: 100%;
            line-height: 35px;
            text-align: center;
            color: #a5b1c3;
            font-size: 14px;
            border-radius: 5px;
            &:hover {
              cursor: pointer;
            }
          }

          .tab-selected {
            background-color: $third-color;
            color: white;
          }
        }

        .ranking {
          display: flex;
          justify-content: space-between;
          align-items: center;
          width: 85px;
          &:hover {
            cursor: pointer;
          }
        }
      }
      .mb-bottom {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;

        .mb-bottom-1 {
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          align-items: center;
          width: 100%;
          padding: 15px 50px;
          padding-bottom: 45px;
          background-color: #fff;
          border-radius: 5px;
          .data-panel {
            display: flex;
            align-items: center;
            width: 660px;
            height: 150px;
            background-color: $primary-color;
            margin-bottom: 25px;
            border-radius: 5px;
            .dp-left {
              width: 55%;
              height: 100%;
              display: flex;
              flex-direction: column;
              justify-content: space-between;
              align-items: flex-start;
              color: white;
              padding: 15px 0px 15px 33px;

              .data-boxes {
                display: flex;
                justify-content: space-between;
                align-items: center;
                width: 250px;
                [class^='data-box'] {
                  text-align: center;
                  div {
                    font-size: 28px;
                    font-weight: bold;
                  }
                  h4 {
                    font-size: 14px;
                  }
                }
              }
            }
            .dp-right {
              display: flex;
              flex-direction: column;
              justify-content: space-between;
              align-items: center;
              padding: 15px 20px 15px 20px;
              width: 45%;
              height: 100%;
              color: white;
              #dpr-bar-1 {
                display: flex;
                justify-content: space-between;
                align-items: center;
                width: 90%;
                height: 40px;
                padding: 0 20px;
                background-color: $secondary-color;
                border-radius: 5px;
                color: white;
              }
              #dpr-bar-2 {
                width: 100%;
                height: 30px;
                margin-bottom: 10px;
                display: flex;
                justify-content: space-evenly;
                align-items: center;

                .dpr-box {
                  width: 30px;
                  height: 30px;
                  line-height: 30px;
                  border: 1px solid #e5eef3;
                  border-radius: 50%;
                  background-color: transparent;
                  text-align: center;
                }
              }
            }
          }
          .notifications {
            width: 660px;
            height: 350px;
            margin-bottom: 40px;
            border-radius: 5px;
            .ntf-list {
              > li {
                width: 100%;
                height: 40px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                background-color: #f2f2f2;
                padding: 0 20px;
                padding-right: 5px;
                margin-bottom: 15px;
                border-radius: 5px;

                &:first-of-type {
                  height: 45px;
                }
                &:not(:first-of-type) {
                  cursor: pointer;
                }
                h5 {
                  font-size: 14px;
                  width: 75%;
                  font-weight: normal;
                  white-space: nowrap;
                  overflow: hidden;
                  text-overflow: ellipsis;
                }
                h6 {
                  font-size: 12px;
                  color: #ccc;
                  width: 20%;
                  margin-left: 10px;
                  font-weight: normal;
                }
              }
              .ntf-title {
                position: relative;
                align-items: flex-start;
                padding: 6px 20px;
                h3 {
                  padding: 3px 0;
                  font-weight: bold;
                }
                .dropdown {
                  position: absolute;
                  right: 20px;
                  color: white;
                  height: 155px;
                  display: flex;
                  flex-direction: column;
                  justify-content: space-between;
                  align-content: center;
                  .drop-first-item {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    width: 100px;
                    height: 30px;
                    padding: 5px 10px;
                    border-radius: 5px;
                    background-color: $primary-color;
                    &:hover {
                      cursor: pointer;
                    }
                  }
                  .drop-list {
                    color: rgb(51, 51, 51);
                    background-color: #fff;
                    border-radius: 5px;
                    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.35);
                    display: none;
                    padding: 5px 0px;
                    li {
                      display: flex;
                      justify-content: center;
                      align-items: center;
                      width: 100px;
                      height: 35px;
                      padding: 5px 10px;

                      &:hover {
                        cursor: pointer;
                        background-color: #ccc;
                      }
                    }
                  }
                }
              }
            }
          }
          .more-data {
            width: 270px;
            height: 30px;
            border-radius: 5px;
            text-align: center;
            line-height: 30px;
            color: #a5b1c3;
            border: 1px solid #a5b1c3;
            font-size: 14px;
            font-weight: bold;
            &:hover {
              cursor: pointer;
            }
          }
        }

        .mb-bottom-2,
        .mb-bottom-3 {
          position: relative;
          display: none;
          justify-content: space-between;
          align-items: center;
          width: 100%;
          height: 580px;

          .content,
          .sidebar {
            border-radius: 5px;
            background-color: #fff;
            height: 100%;
            overflow: auto;
          }

          .content {
            width: 66%;
            padding: 10px 20px;
            position: relative;

            .content-question {
              margin-top: 20px;
              width: 100%;

              h5.question-text {
                font-size: 16px;
                font-weight: normal;
              }
              .circle-box {
                width: 30px;
                height: 30px;
                border-radius: 50%;
                background-color: #ccc;
                color: $third-color;
                line-height: 30px;
                text-align: center;
              }

              .answers {
                margin: 20px 0;
                li {
                  display: flex;
                  align-items: center;
                  margin-bottom: 30px;
                  font-size: 14px;
                  flex-shrink: 0;
                  height: 25px;
                  span {
                    width: 90%;
                    margin-left: 15px;
                  }
                }
              }

              .cq-box {
                width: 100%;
                display: flex;
                justify-content: center;
                align-items: center;
              }

              .cq-row-1,
              .cq-row-2 {
                width: 100%;
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;
                align-content: center;
                margin: 40px 0;

                button {
                  width: 80px;
                  height: 40px;
                  border-radius: 5px;
                  border: none;
                  color: #fff;
                  background-color: $primary-color;
                  margin-bottom: 10px;
                  &:hover {
                    cursor: pointer;
                  }
                }
              }

              .cq-row-2 {
                position: absolute;
                bottom: 0;
                padding: 0 20px;
              }

              .question-detail {
                display: flex;
                justify-content: flex-start;
                align-items: flex-start;
                width: 100%;
                height: 180px;
                background-color: #ddd;
                border-radius: 5px;
                padding: 10px;
                ul {
                  li {
                    margin: 10px 0;
                  }
                }
                #qd-items {
                  text-align: right;
                }
                .correct {
                  color: green;
                }
                .wrong {
                  color: red;
                }
              }
            }
          }
          .sidebar {
            width: 30%;
            height: 80%;
            position: relative;
            padding: 10px 20px;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            font-size: 14px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
            [class^='sb-box'] {
              width: 100%;
              margin-bottom: 20px;
            }
            .sb-box-1 {
              height: 43px;
              display: flex;
              justify-content: space-between;
              align-items: center;
              border-bottom: 1px solid #ccc;
              .sb-row {
                height: 43px;
                line-height: 43px;
                span {
                  color: darkred;
                }
              }
            }

            .sb-box-2 {
              display: flex;
              justify-content: flex-start;
              align-items: center;
              flex-wrap: wrap;

              .rect-box {
                width: 30px;
                height: 30px;
                border-radius: 5px;
                border: none;
                line-height: 30px;
                text-align: center;
                margin-right: 8px;
                margin-bottom: 8px;
                background-color: #ddd;
                box-shadow: 0 0 3px rgba(0, 0, 0, 0.35);
                &:nth-of-type(5n) {
                  margin-right: 0;
                }

                &:hover {
                  cursor: pointer;
                }
              }

              .box-selected {
                background-color: $secondary-color;
                color: white;
              }
            }
          }
        }

        .mb-bottom-2 .sb-row-2 {
          position: absolute;
          left: 20px;
          bottom: 40px;
          display: flex;
          justify-content: space-between;
          align-items: center;
          width: 80%;
          height: 50px;

          input {
            /* 直接将input默认框隐藏不展示 */
            display: none;
          }
          /* 点击input框时label背景变色 */
          input:checked + label {
            background: $primary-color;
          }
          /* 点击input框时label伪元素圆形按钮移动 */
          input:checked + label::before {
            left: 100%;
            transform: translateX(-100%);
          }
          /* 点击input框时label伪元素圆形按钮放大 */
          input:active + label::before {
            width: 20px;
          }
          /* 开关背景样式 */
          label {
            position: relative;
            display: block;
            cursor: pointer;
            width: 40px;
            height: 20px;
            border-radius: 20px;
            background: linear-gradient(
                rgba(0, 0, 0, 0.07),
                rgba(255, 255, 255, 0)
              ),
              #ddd;
            box-shadow: 0 0.07em 0.1em -0.1em rgba(0, 0, 0, 0.4) inset,
              0 0.05em 0.08em -0.01em rgba(255, 255, 255, 0.7);
          }
          /* 开关圆形按钮 */
          label::before {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            background: linear-gradient(#f5f5f5 10%, #eeeeee);
            border-radius: 20px;
            top: 0px;
            left: 0px;
            transition: all 0.36s cubic-bezier(0.78, 0.14, 0.15, 0.86);
          }
        }

        .mb-bottom-3 .sb-row-2 {
          position: absolute;
          left: 20px;
          bottom: 40px;
          display: flex;
          justify-content: space-between;
          align-items: center;
          width: 80%;
          height: 50px;

          input {
            /* 直接将input默认框隐藏不展示 */
            display: none;
          }
          /* 点击input框时label背景变色 */
          input:checked + label {
            background: $primary-color;
          }
          /* 点击input框时label伪元素圆形按钮移动 */
          input:checked + label::before {
            left: 100%;
            transform: translateX(-100%);
          }
          /* 点击input框时label伪元素圆形按钮放大 */
          input:active + label::before {
            width: 20px;
          }
          /* 开关背景样式 */
          label {
            position: relative;
            display: block;
            cursor: pointer;
            width: 40px;
            height: 20px;
            border-radius: 20px;
            background: linear-gradient(
                rgba(0, 0, 0, 0.07),
                rgba(255, 255, 255, 0)
              ),
              #ddd;
            box-shadow: 0 0.07em 0.1em -0.1em rgba(0, 0, 0, 0.4) inset,
              0 0.05em 0.08em -0.01em rgba(255, 255, 255, 0.7);
          }
          /* 开关圆形按钮 */
          label::before {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            background: linear-gradient(#f5f5f5 10%, #eeeeee);
            border-radius: 20px;
            top: 0px;
            left: 0px;
            transition: all 0.36s cubic-bezier(0.78, 0.14, 0.15, 0.86);
          }
        }
      }
    }
  }

  .ntf-modal {
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 700px;
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
    button.close {
      position: absolute;
      top: 10px;
      right: 10px;
      background-color: #cccccc;
      border: none;
      width: 30px;
      height: 30px;
      line-height: 30px;
      font-size: 32px;
      border-radius: 50%;
      &:hover {
        cursor: pointer;
      }
    }
    > div {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      margin-bottom: 10px;
    }
    .modal-date-time {
      color: #ccc;
      font-weight: normal;
      .m-date-time {
        margin-left: 10px;
      }
    }

    .modal-article {
      width: 100%;
      height: 100%;
      zoom: 50%;
      border: none;
    }
  }

  .ranking-modal {
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 700px;
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
    button.close {
      position: absolute;
      top: 10px;
      right: 10px;
      background-color: #cccccc;
      border: none;
      width: 30px;
      height: 30px;
      line-height: 30px;
      font-size: 32px;
      border-radius: 50%;
      &:hover {
        cursor: pointer;
      }
    }
    > div {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      margin-bottom: 10px;
    }
    .modal-title {
      width: 100%;
      height: 36px;
      padding: 4px 0;
      font-size: 24px;
      font-weight: bold;
      border-bottom: 1px solid gray;
    }
    .ranking-selection {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      width: 100%;

      select {
        width: 65%;
        height: 30px;
      }
    }

    .ol-ranking {
      width: 100%;
      li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 50px;
        font-size: 18px;
        border-bottom: 1px solid #ccc;
        margin-bottom: 5px;
        span:first-of-type {
          display: inline-flex;
          align-items: center;
        }
        .sname {
          display: inline-flex;
          align-items: center;
          height: 40px;
          // line-height: 40px;
        }
        img {
          width: 30px;
          height: 30px;
          border-radius: 50%;
        }
      }
    }

    .modal-article {
      width: 100%;
      height: 100%;
      zoom: 50%;
      border: none;
    }
  }

  .user-modal {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 720px;
    height: 550px;
    background: #fff;
    border-radius: 10px;
    padding: 35px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
    button.close {
      position: absolute;
      top: 20px;
      right: 25px;
      background-color: #cccccc;
      border: none;
      width: 30px;
      height: 30px;
      line-height: 30px;
      font-size: 32px;
      border-radius: 50%;
      &:hover {
        cursor: pointer;
      }
    }
    h2 {
      position: absolute;
      top: 20px;
      left: 40px;
    }
    .modal-main {
      margin-top: 30px;
      display: flex;
      justify-content: flex-start;
      align-items: flex-start;
    }
    .u-sidebar {
      width: 15%;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
      margin-right: 10px;
      padding-left: 10px;
      border-radius: 5px;
      li {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        height: 50px;
        &:nth-of-type(2) {
          height: 150px;
        }
        &:nth-of-type(3) {
          margin-top: 20px;
        }
      }
    }
    .u-main {
      width: 80%;
      padding-left: 10px;
      background-color: whitesmoke;
      border-radius: 5px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
      li {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        height: 50px;
        input {
          height: 30px;
          padding-left: 5px;
        }
        [class^='radio'],
        [class^='cb'] {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-right: 10px;
          input[id^='cb-'] {
            margin-left: 5px;
          }
        }

        label {
          margin: 0 5px;
        }
        &:first-of-type {
          font-size: 14px;
          color: #ccc;
        }
        &:nth-of-type(2) {
          flex-direction: column;
          justify-content: space-evenly;
          align-items: flex-start;
          height: 150px;
          img {
            width: 100px;
            height: 100px;
          }
        }
        &:nth-of-type(3) {
          margin-top: 20px;
        }
      }
    }
    #submit-user-change {
      position: absolute;
      bottom: 40px;
      left: 50%;
      transform: translateX(-50%);
      width: 150px;
      height: 40px;
      border-radius: 5px;
      border: none;
      color: #fff;
      background-color: $primary-color;
      &:hover {
        cursor: pointer;
      }
    }
  }
}
